package com.wiscamp.ninechapters.panels.application.command;

import cube.ddd.application.command.CommandObject;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

@Data
@EqualsAndHashCode(callSuper = true)
public class UpdateDictionaryCommand extends CommandObject {
    /**
     * 字典编号
     */
    @Min(value = 1, message = "编号最小值不能低于1。")
    private long dictionaryId = 0;

    /**
     * 应用编号
     */
    @Min(value = 1, message = "编号最小值不能低于1。")
    private long applicationId = 0;

    /**
     * 字典代码
     */
    @NotBlank(message = "字典代码不能为空。")
    @Length(max = 50, message = "字典代码文本长度不能超过50。")
    private String dictionaryCode = "";

    /**
     * 字典名称
     */
    @NotBlank(message = "字典名称不能为空。")
    @Length(max = 100, message = "字典名称文本长度不能超过100。")
    private String dictionaryName = "";

    /**
     * 字典分组
     */
    @Length(max = 50, message = "字典分组文本长度不能超过50。")
    private String dictionaryGroup = "";

    /**
     * 字典层级
     */
    private int dictionaryLevel = 0;

    /**
     * 上级字典编号
     */
    private int parentId = 0;

    /**
     * 备注
     */
    @Length(max = 250, message = "备注文本长度不能超过250。")
    private String remark = "";
}
